package com.mabs.ground.core;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import com.mabs.ground.core.model.ModelObject;
import com.mabs.ground.shared.DataRequestBean;

@XmlRootElement
public class DataRequest extends ModelObject implements DataRequestBean,
		Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8359616746186028769L;

	private String operationType;

	private int startRow;

	private int endRow;

	@XmlElement(name = "data")
	private Class<?> entityClass;

	@XmlElement(name = "data")
	private Map<String, Object> criteria;

	private List<String> sortBy;

	public String getOperationType() {
		return operationType;
	}

	public int getStartRow() {
		return startRow;
	}

	public int getEndRow() {
		return endRow;
	}

	public Class<?> getEntityClass() {
		return entityClass;
	}

	public Map<String, Object> getCriteria() {
		return criteria;
	}

	public List<String> getSortBy() {
		if (sortBy == null) {
			sortBy = new ArrayList<String>();
		}
		return sortBy;
	}

	@Override
	public Serializable getId() {
		// TODO Auto-generated method stub
		return null;
	}
}
